package com.magic.item.mapper;

import com.magic.item.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * Created by zhuqin on 2021/3/24
 */
public interface UserMapper extends Mapper<User> {
    @Select("select * from tb_user where username like concat('%', #{keyword}, '%')")
    List<User> selectExample(String keyword);
    @Delete("delete from tb_user where id = #{uid}")
    void deleteUser(Long uid);
    @Select("select * from tb_user where id = #{uid}")
    List<User> selectUserById(Long uid);
}
